

use "$data/clean/clean_main_complete.dta" , replace


		   
loc experiments  "n_intendedact  int_booth int_call int_posters  int_friends int_online int_doortodoor int_days_doortodoor"

		   
preserve

clear all
eststo clear
estimates drop _all

set obs 10
qui gen x = 1
qui gen y = 1

loc columns = 0

foreach choice in `experiments' {

    loc ++columns
    qui eststo col`columns': reg x y

}

restore


/* Statistics */

loc colnum = 1
loc colnames ""


foreach choice in `experiments' {

/* Statistics */



 
 
********************************Panel A*****************************************
	
 xi: reg `choice'  voice_instrumental voice_intrinsic voice_feedback_intrinsic voice_feedback_instrumental $control , vce(r) // 
   
   
    sigstar voice_instrumental   , prec(3)
    estadd loc thisstat3 = "`r(bstar)'": col`colnum'
    estadd loc thisstat4 = "`r(sestar)'": col`colnum'
   
    sigstar voice_feedback_instrumental , prec(3)
    estadd loc thisstat6 = "`r(bstar)'": col`colnum'
    estadd loc thisstat7 = "`r(sestar)'": col`colnum'
	
	sigstar  voice_intrinsic , prec(3)
    estadd loc thisstat9 = "`r(bstar)'": col`colnum'
    estadd loc thisstat10 = "`r(sestar)'": col`colnum'
		
	sigstar voice_feedback_intrinsic , prec(3)
    estadd loc thisstat12 = "`r(bstar)'": col`colnum'
    estadd loc thisstat13 = "`r(sestar)'": col`colnum'

		
		 
	qui sum `choice' if control==1
	estadd loc thisstat15 = string(`r(mean)', "%9.2f"): col`colnum'
	
	qui sum `choice' 
    estadd loc thisstat16 = string(`r(N)', "%9.0f"): col`colnum'
	
	
    loc ++colnum
    loc colnames "`colnames' `"`: var la `choice''"'"

	}
	

	 

loc rowlabels " " " "  " "Treatment: instrumental" " " " "  "Treatment: instrumental + feedback" " " " " "Treatment: intrinsic" " " " "  "Treatment: intrinsic + feedback" " " " "  "Control mean" "Number of Observations" "

loc rowstats ""

forval i = 1/16 {
    loc rowstats "`rowstats' thisstat`i'"
}


esttab col* using "$output/treat_intentions_detailed.tex", replace cells(none) booktabs nonotes  compress alignment(c) nogap noobs nobaselevels label stats(`rowstats', labels(`rowlabels')) ///
  mtitle("\# activities" "Campaign booth" "Phone canvassing"  "Stick posters" "Convince friends" "Online campaigning"  "Any canvassing"  "\# days canvassing" )


